﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace FatoryTool
{
    public class PipeLine
    {
        /// <summary>
        /// 管道直径
        /// </summary>
        public double PipeDiameter
        { get; set; }
        List<PipeEndPoint> pointslist = new List<PipeEndPoint>();

        public PipeLine(double PipeDiameter)
        {
            this.PipeDiameter = PipeDiameter;
        }

        //定义了Index为int类型
        public PipeEndPoint this[int index]
        {
            get { return pointslist[index]; }
            set { pointslist[index] = value; }
        }

        public int Count
        { get { return pointslist.Count; } }

        public void Add(PipeEndPoint EndPoint)
        {
            pointslist.Add(EndPoint);
        }

        public void Insert(int index, PipeEndPoint EndPoint)
        {
            pointslist.Insert(index, EndPoint);
        }

        public void Remove(int index)
        {
            pointslist.RemoveAt(index);
        }
    }
}
